<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue模板语法-监听事件</title>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="app">
  <button v-on:click="Add">累加器</button>
  <p>当前点击次数： {{ counter }} </p>
</div>

<script>
new Vue({
  el: '#app',
  data: {
    counter: 0
  },
  methods:{
      Add: function(event){
       return this.counter+=1}
  }
})
</script>
</body>
</html>